﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace Microsoft.Forums.ForumsClient
{
    /// <summary>
    /// Exposes routed commands used by the application.
    /// </summary>
    public static class Commands
    {
        /// <summary>
        /// Executed when a forum needs to be synchronized
        /// </summary>
        public static readonly RoutedCommand SynchronizeForum = new RoutedCommand();

        /// <summary>
        /// Executed when all the subscribed forums needs to be synchronized
        /// </summary>
        public static readonly RoutedCommand SynchronizeAllForums = new RoutedCommand();

        
        /// <summary>
        /// Executed when a forum needs to be unsubscribed
        /// </summary>
        public static readonly RoutedCommand UnsubscribeForum = new RoutedCommand();

        /// <summary>
        /// Executed when the user wants to logon
        /// </summary>
        public static readonly RoutedCommand LogOn = new RoutedCommand();

        /// <summary>
        /// Executed when the subscription dialog should be shown
        /// </summary>
        public static readonly RoutedCommand ShowSubscribeDialog = new RoutedCommand();

        /// <summary>
        /// Executed when the theme needs to be changed
        /// </summary>
        public static readonly RoutedCommand ChangeTheme = new RoutedCommand();

        /// <summary>
        /// Executed when the toggle button for expanding and collapsing child posts is pressed
        /// </summary>
        public static readonly RoutedCommand ExpandOrCollapseChildPosts = new RoutedCommand();

        /// <summary>
        /// Executed when the Options Settings Dialog should be shown
        /// </summary>
        public static readonly RoutedCommand ShowOptionsSettingsDialog = new RoutedCommand();

        /// <summary>
        /// Executed by the Options Settings Dialog to save user's synchronization settings
        /// </summary>
        public static readonly RoutedCommand SaveOptionsSettings = new RoutedCommand();

        /// <summary>
        /// Executed when marking a post as read
        /// </summary>
        public static readonly RoutedCommand MarkAsRead = new RoutedCommand();

        #region Write Commands

        /// <summary>
        /// Executed when marking a post as answer
        /// </summary>
        public static readonly RoutedCommand MarkAsAnswer = new RoutedCommand();

        /// <summary>
        /// Executed when the create reply form must be shown
        /// </summary>
        public static readonly RoutedCommand ShowCreateReplyForm = new RoutedCommand();

        /// <summary>
        /// Executed when the create thread form must be shown
        /// </summary>
        public static readonly RoutedCommand ShowCreateThreadForm = new RoutedCommand();

        #endregion

        #region SubscribeToForums Dialog Commands
        // SubscribeToForums Dialog Commands
        // These commands are used in the SubscribeToForumsDialog
        // 

        /// <summary>
        /// Executed when a forum needs to be subscribed to
        /// </summary>
        public static readonly RoutedCommand SubscribeToForums = new RoutedCommand();

        /// <summary>
        /// Executed when a forum needs to be added to preview area
        /// </summary>
        public static readonly RoutedCommand AddToPreviewArea = new RoutedCommand();

        /// <summary>
        /// Executed when a forum needs to be removed from the preview area
        /// </summary>
        public static readonly RoutedCommand RemoveFromPreviewArea = new RoutedCommand();

        /// <summary>
        /// Executed when the list of available forums needs to be refreshed
        /// </summary>
        public static readonly RoutedCommand RefreshAvailableForums = new RoutedCommand();
        #endregion
    }
}
